/*
 * CAppStateStage.h
 *
 *  Created on: 26/12/2012
 *      Author: Dalton
 */

#ifndef CAPPSTATESTAGE_H_
#define CAPPSTATESTAGE_H_
#include "CAppState.h"
#include "CSurface.h"
#include <SDL/SDL_net.h>
#include "CNet.h"


class CAppStateStage : public CAppState {
	private:
    	static CAppStateStage instance;
		SDL_Surface* surface;
		CClientSocket* tcpClient;
		CHostSocket* tcpListener;
		CNetMessage msg;
	public:
		CAppStateStage();

	public:
        void onActivate();

        void onDeactivate();

        void onLoop();

        void onRender(SDL_Surface* surfDisplay);

        static CAppStateStage* getInstance();

        void setTcpListener(CHostSocket* chsock);
        void setTcpClient(CClientSocket* csock);

};

#endif /* CAPPSTATESTAGE_H_ */
